package me.zhengjie.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Data
@Component
public class AppConfig {
    public static Boolean isDebug;
    public static String logFile;
    public static Boolean showResult;
    public static Boolean showResultPretty;
    public static String baseBarCodePath;

    @Value("${app.is_debug}")
    public void setIsDebug(Boolean isDebug) {
        AppConfig.isDebug = isDebug;
    }

    @Value("${app.log_file}")
    public void setLogFile(String logFile) {
        AppConfig.logFile = logFile;
    }

    @Value("${app.show_result}")
    public void setShowResult(Boolean showResult) {
        AppConfig.showResult = showResult;
    }

    @Value("${app.show_result_pretty}")
    public void setShowResultPretty(Boolean showResultPretty) {
        AppConfig.showResultPretty = showResultPretty;
    }

    @Value("${app.base_bar_code_path}")
    public void setBaseBarCodePath(String baseBarCodePath) {
        AppConfig.baseBarCodePath = baseBarCodePath;
    }

}
